package springapp.web;

import java.util.HashMap;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import springapp.service.CompanyService;
import springapp.service.IIndustryService;
import springapp.service.ILocationService;

@Controller
public class RequestUpdateCompanyController implements IControllerConstants {

	@Autowired(required = true)
	private CompanyService companyService;

	@Autowired(required = true)
	private ILocationService locationService;

	@Autowired(required = true)
	private IIndustryService industryService;

	@RequestMapping(value = "/updateCompany.htm", method = RequestMethod.GET)
	public ModelAndView handleRequest(
			@RequestParam("companyId") String companyId) throws Exception {
		/*CompanyEntity company = this.companyService.getCompany(Utils.getInt(companyId));

		Set<String> industries = industryService.getAllIndustries();

		Set<String> locations = locationService.getAllLocations();

		Map<String, Object> map = new HashMap<String, Object>();

		map.put(IServiceConstants.LOCATIONS, locations);
		map.put("companyName", company.getCompanyName());
		map.put("companyId", company.getCompanyId());
		map.put("locationJson", Utils.getCommaSeperatedList(locations));

		map.put(IServiceConstants.INDUSTRY, industries);*/

		ModelAndView modelAndView = new ModelAndView("UpdateCompany.jsp",
				"jsonMap", new HashMap());
		return modelAndView;
	}
}
